/*
 * Copyright (c) 2007 IJO Technologies Ltd.
 * www.ijotechnologies.com
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * IJO Technologies ("Confidential Information").
 * You shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement you
 * entered into with IJO Technologies.
 */

package com.iye.puretennis.custom;

import org.java_websocket.client.WebSocketClient;
import org.java_websocket.drafts.Draft;
import org.java_websocket.handshake.ServerHandshake;

import java.net.URI;
import java.util.Map;

/**
 * @author Daiyu Chen
 */
public class ChatWebSocketClient extends WebSocketClient {
    public ChatWebSocketClient(URI serverURI) {
        super(serverURI);
    }

    public ChatWebSocketClient(URI serverUri, Draft draft) {
        super(serverUri, draft);
    }

    public ChatWebSocketClient(URI serverUri, Draft draft, Map<String, String> headers, int connecttimeout) {
        super(serverUri, draft, headers, connecttimeout);
    }

    @Override
    public void onOpen(ServerHandshake serverHandshake) {
        System.out.println("Web socket on open");
    }

    @Override
    public void onMessage(String s) {
        System.out.println("Web socket on message");
    }

    @Override
    public void onClose(int i, String s, boolean b) {
        System.out.println("Web socket on close");
    }

    @Override
    public void onError(Exception e) {
        System.out.println("Web socket on error");
    }
}
